Skip to content

Sync upstream through 8ef86077e - #98

Merged
ColumbusLabs merged 31 commits into
mainfrom
automation/upstream-tail-8ef86077-20260729
Jul 30, 2026
Merged

Sync upstream through 8ef86077e#98
ColumbusLabs merged 31 commits into
mainfrom
automation/upstream-tail-8ef86077-20260729

Conversation

@ColumbusLabs

Copy link
Copy Markdown
Owner

Upstream range

  • Base: ab31038ed8cf66a1231ef5f21a07e56a4037221a
  • Head: 8ef86077e70ac27d45ddddaf49e409824ccdf668
  • Risk: high — provider/auth/quota behavior, shared sync/mobile surfaces, runtime/CLI configuration, and broad menu/cost presentation changes

Review and QuotaKit adaptations

  • Reviewed provider/auth/quota behavior, with focused attention on xAI billing credentials, fail-closed usage parsing, posted-ledger disclosure, Crof quota semantics, and currency conversion validity.
  • Reviewed runtime/CLI/config behavior; preserved the QuotaKit config path and kept CLI xAI amounts in USD with explicit ledger-lag wording.
  • Reviewed mobile/widget/sync behavior; added xAI palette/icon parity, stable quota-zone registration, UTC history mapping, and preserved the existing CloudKit schema and account identity contract.
  • Preserved QuotaKit and Columbus Labs public branding, docs, release URLs, appcast ownership, build numbers, and release metadata.
  • Advanced only UPSTREAM_MONITOR_BASE; UPSTREAM_VERSION remains v0.43.0.

Validation

  • ./Scripts/check_upstreams.sh — 0 commits beyond reviewed head
  • git diff --check — passed
  • swift build — passed
  • Focused provider/config/parser/sync/currency tests — passed, including SyncCoordinatorTests 38/38 and QuotaProviderListTests 14/14
  • PARSER_LINT_BASE=origin/main ./Scripts/lint.sh lint — passed; 0 format changes, 0 lint violations, localization complete, public branding audit clean, provider palette 66/66
  • make test — 798 selections, 67/67 groups passed first attempt, 0 retries, 0 timeouts
  • iOS simulator test on iPhone 17 Pro with signing disabled — 643 passed, 0 failed, 0 skipped

Build numbers are unchanged.

smkwray and others added 30 commits July 29, 2026 08:52
Crof removed subscription request quotas and now returns null
requests_plan/usable_requests. Parse credits only and show the
dollar balance as the primary usage window.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
Add a separate xai provider for xAI developer-platform billing from the
documented Management API (management key + team ID): prepaid credit
balance from /prepaid/balance (inverted ledger in string USD cents; a
200 without a parseable total is an error, never $0.00) and a 30-day
daily USD spend dashboard from /usage via the shared cost-history seam.
History is best-effort enrichment - its failure keeps the balance while
auth failures and cancellation escalate - and limitReached marks the
window "(partial)" with estimated confidence instead of exact. No
coupling to the Grok subscription provider. Covers descriptor, fetcher,
settings reader/store, registries, config projection, widget and CLI
switches, template icon with a Grok-distinctness test, docs, and
fixture-based tests on stubbed transports. Moves ProviderIdentitySnapshot
to its own file to hold the UsageFetcher length limit. (#1712)
The generic no-window providerCost fallback printed the prepaid balance
as "Cost: 7.4 / 0.0", presenting money remaining as spend against a
zero budget. Exclude xAI's balance-shaped providerCost from that
fallback and add a dedicated Balance + spend-window line to the CLI
text, card body, and card extras renderers, matching the Devin/MiMo
balance-line pattern. Flagged by Codex review on #2472.
Route xAI through cleanPlanName so the CLI plan badge shows
"Management API" instead of the .capitalized mangling "Management Api"
seen in live verification on #2472. Document that the balance is the
posted prepaid ledger: spend posts at billing-cycle close, so mid-cycle
the ledger balance exceeds the Console's live remaining credit by the
cycle's unposted spend, as confirmed on a real account.
…ded plan_family

StepFun runs two Step Plan billing models side by side after the 2026-06-18
upgrade (docs/zh/step-plan/upgrade-notice): the grandfathered Coding Plan meters
rolling 5-hour/weekly windows, while the current Token Plan meters a monthly
Credit pool via plan_credit_rate_limit (its rate windows come back as 0 with
reset_time "0").

isCreditPlan trusted plan_family == 2 first, so a windowed plan that ever
reported plan_family=2 (or any future family-id change) would route to the
credit renderer — dropping the real 5h/weekly windows and showing a bogus credit
balance. Classify by the shape the payload actually carries (a live window reset
time means Coding Plan; no window plus a Credit pool means Token Plan) and use
plan_family only as a tie-breaker for an otherwise-ambiguous payload.

Adds tests for the window-wins-over-family-id case and the ambiguous fallback.
Verified live against a Token Plan account (still renders the credit balance).
- Add CurrencyExchange service with cross-currency conversion via open.er-api.com
- 24h rate caching with hardcoded fallbacks for offline use
- UsageFormatter: smart conversion methods (auto-follow provider vs explicit currency)
- Settings: preferredCurrencyCode preference with Picker UI
- Thread preferredCurrency through providerCostSection, ampCreditsLine, sakanaPayAsYouGoSection
- Update MenuDescriptor, MenuCardView, MenuBarLayout cost paths
- Add zh-Hans localization for currency_auto
- Trigger rate fetch on app launch and settings change
- 43 tests pass including cross-currency conversion tests
- Fix line_length violations by extracting cost variables
- Fix multiline_parameters / multiline_arguments formatting
- Fix unused_closure_parameter by restructuring closures
- Fix function_body_length by extracting resolvePaceAndForecast helper
- Fix nested string interpolation causing parse errors
Credits-only Crof windows have no duration, so a $0 balance was treated
like a depleted session quota. Skip Crof in sessionQuotaWindow, cover
depletion/top-up in the transition tests, and add Linux credits-only
decoding proof.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
Only skip session-quota transitions when Crof has no secondary quota
window. Quota-backed Crof snapshots keep notification eligibility.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
…ation

Classify StepFun Coding vs Token Plan by payload shape, not a hard-coded plan_family
feat: multi-currency cost display with live exchange rates (Issue #2449)
Fix Crof usage for PAYG credits-only API
…-tail-8ef86077-20260729

# Conflicts:
#	README.md
#	Scripts/check-site-locales.mjs
#	Sources/CodexBar/UsageStore+WidgetSnapshot.swift
#	Sources/CodexBarCore/Generated/CodexParserHash.generated.swift
#	Sources/CodexBarCore/UsageFetcher.swift
#	docs/cli-configuration.md
#	docs/configuration.md
#	docs/index.html
#	docs/llms.txt
#	docs/providers.md
#	docs/site-locales.mjs
@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@ColumbusLabs

Copy link
Copy Markdown
Owner Author

Reviewed high-risk surfaces: provider/auth/quota accuracy, process/CLI/runtime configuration, mobile/widget/CloudKit sync compatibility, branding/release ownership, and validation coverage. QuotaKit adaptations and all local results are recorded in the PR body; required CI is now being monitored against exact head 21d1bf6df.

@ColumbusLabs
ColumbusLabs force-pushed the automation/upstream-tail-8ef86077-20260729 branch from 21d1bf6 to cfb4d65 Compare July 29, 2026 23:54
@ColumbusLabs
ColumbusLabs merged commit 0dbf04c into main Jul 30, 2026
9 checks passed
@ColumbusLabs
ColumbusLabs deleted the automation/upstream-tail-8ef86077-20260729 branch July 30, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants